﻿using System;
using System.Text;
using System.Collections.Generic;
using System.Linq;
using Microsoft.VisualStudio.TestTools.UnitTesting;

namespace BaffoHat.Core.Test
{
    [TestClass]
    public class PlayerTest
    {
        [TestMethod]
        public void Player_costructor()
        {
            Player player = new Player("Pippo");

            Assert.AreEqual(player.Name, "Pippo");
            Assert.AreEqual(player.GlassesDrink, 0);
        }

        [TestMethod]
        [ExpectedException(typeof(ArgumentNullException))]
        public void Player_costructor_name_null()
        {
            Player player = new Player(null);
        }

        [TestMethod]
        [ExpectedException(typeof(ArgumentNullException))]
        public void Player_costructor_name_void()
        {
            Player player = new Player("");
        }

        [TestMethod]
        public void Player_Drink()
        {
            Player player = new Player("Pippo");

            player.Drink();

            Assert.AreEqual(player.GlassesDrink , 1);

            player.Drink();

            Assert.AreEqual(player.GlassesDrink, 2);
        }

    }
}
